const KoaRouter = require('koa-router');
const router = new KoaRouter({ prefix: '/task' });
const taskController = require('../controllers/taskController');
const { authenticateToken } = require('../middleware/validation');

router.get('/list', authenticateToken, taskController.getTaskList);
router.post('/add', authenticateToken, taskController.addTask);
router.put('/update/:id', authenticateToken, taskController.updateTask);
router.delete('/delete/:id', authenticateToken, taskController.deleteTask);

module.exports = router;